<!--
 * @Description:
 * @Author: yilingsj（315800015@qq.com）
 * @Date: 2021-06-27 22:09:28
 * @LastEditors: liu (1427179517@qq.com)
 * @LastEditTime: 2023-05-09 14:16:28
 * @FilePath: \jiekuan-app\src\App.vue
-->
<script>

	// import qiunLoadingVue from './components/qiun-loading/qiun-loading.vue'
	// import { getNowLocation, getSettingUserLocation } from '@/utils/publicMethod'
	export default {
		onLaunch(options) {
			// #ifdef APP-PLUS
			if (uni.getStorageSync('token')) {
				plus.runtime.getProperty(plus.runtime.appid, (inf) => {
					var versionCode = ''
					console.log(inf, '版本号') // res
					versionCode = Number(inf.versionCode)
					console.log(versionCode, '复制')
					this.$u.api.listSystemset({
						code: 'ANDROID_VERSION'
					}).then((res) => {
						const updateAppCode = Number(res.data)
						console.log(updateAppCode, '样式')
						if (updateAppCode > versionCode) {
							this.$jump({
								name: 'index',
								type: 'replace'
							})
						}
					})
				})
			}
			// #endif
		},
		onShow() {
			// 这里登陆当前用户
			let mobile = uni.getStorageSync('mobile');
			const {user,pwd} = this.$WebIM.makeAuthMap(mobile)
			this.$WebIM.login(user, pwd).then(rep => {
				console.log("WebIM.conn.isOpened", this.$WebIM.conn.isOpened())
				console.log('login response', rep)
					this.$store.commit('hx/IS_LOGIN', rep)
			})
			
			console.log('App Show==========', Date.now())
		},
		onHide() {
			console.log('App Hide')
		},
	}
</script>

<style lang="scss">
	// uview基础样式
	@import 'uview-ui/index.scss';
	@import './static/font/iconfont.css';
	@import './static/css/iconfont/iconfont.css'; // 小车样式
	/*每个页面公共css */
	@import './static/css/flex-layout.scss';
	@import './static/css/page-common.scss';
	@import './static/css/uview.scss';
	/* #ifdef H5 || APP-PLUS */
	@import './static/css/uview-h5.scss';
	/* #endif */
</style>98ii8